﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HuaweiCloud.Dotnet.Samples.ESports.Common
{
    /// <summary>
    /// 运动类型常量
    /// </summary>
    public static class SportTypeConsts
    {
        public const string Prefix = "";
        public const string Running = $"{Prefix}Running";
        public const string Swimming = $"{Prefix}Swimming";
        public const string Climbing = $"{Prefix}Climbing";
        public const string Cycling = $"{Prefix}Cycling";
        private static List<string>? _types;
        private static object locker = new object();
        public static List<string> Types
        {
            get
            {
                if(_types == null)
                    lock (locker)
                    {
                        if (_types == null)
                            _types = new List<string>() { Running, Swimming, Climbing, Cycling };
                    }
                return _types;
            }
        }
    }
}
